<template>
  <div class="bottom">
    <div class="b_l">
      <van-sidebar v-model="activeKey">
        <van-sidebar-item
          v-for="(items, index) in list2"
          :key="index"
          class="sele2 list"
          :title="list2[index].name"
        />
      </van-sidebar>
    </div>
    <div class="b_r">
      <ul>
        <li v-for="(items, index) in list2" :key="index"></li>
      </ul>
    </div>
  </div>
</template>
<script>
export default {
  name: "Shangpin",
  data: function () {
    return {
      list2: [],
      shuju: JSON.parse(localStorage.getItem("shuju")),
    };
  },
  created() {
    this.$axios
      .get(
        `https://elm.cangdu.org/shopping/v2/menu?restaurant_id=${this.shuju}`,
        {}
      )
      .then((res) => {
        //console.log(res)
        // 获取对应的数据
        this.list2 = res;
      });
  },
};
</script>
<style lang="less" scoped>
.van-sidebar-item--select::before {
  height: 100% !important;
  background-color: #3190e8 !important;
}
.list {
  width: 98px;
  height: 72px;
}
.select {
  border-bottom: 4px solid #3190e8;
  // padding-bottom: 5px;
  // box-sizing: border-box;
}
.ul_1 {
  display: flex;
  text-align: center;
  box-sizing: border-box;
  padding-top: 15px;
  justify-content: space-around;
}
.mid {
  width: 100%;
  height: 59.2px;
  font-size: 17px;
  background-color: white;
}
.top {
  padding: 10px;
  background-color: rgba(119, 103, 137, 0.43);
  .t1 {
    width: 100%;
    display: flex;
    justify-content: space-between;

    img {
      width: 75px;

      border-radius: 0.15rem;
    }
    .ti_text {
      width: 320px;
      margin-left: 10px;
      h3 {
        color: #fff;
        font-weight: 700;
        margin-bottom: 0.3rem;
      }
      ._center {
        font-size: 0.5rem;
        color: #fff;
        margin-bottom: 0.3rem;
      }
      ._bottom {
        font-size: 0.5rem;
        color: #fff;
        width: 100%;
        overflow: scroll;
      }
    }
  }
  .t2 {
    box-sizing: border-box;
    padding: 5px 0;
    .jian {
      background-color: rgb(240, 115, 115);
      border-color: rgb(240, 115, 115);
      font-size: 0.8rem;
    }
    .msg {
      color: #fff;
      font-size: 0.5rem;
    }
  }
}

.img2 {
  width: 100%;
  position: absolute;
  top: 64px;
  left: 0;
  filter: blur(10px);
  z-index: -9;
}
</style>